package com.lzy.elasticserch.runner;

import com.lzy.elasticserch.canal.SubscriptionResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 项目启动完成后执行
 *
 */
@Component
public class AfterServerStartedRunner implements ApplicationRunner {

    @Autowired
    private SubscriptionResourceService subscriptionResourceService;

    @Override
    public void run(ApplicationArguments args) {
        subscriptionResourceService.subscription();

    }
}
